Get a memory-space purge job [Cloud-only]
curl --request GET \
--url https://api.evermind.ai/api/v2/memory/purge/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evermind.ai/api/v2/memory/purge/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evermind.ai/api/v2/memory/purge/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/purge/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/purge/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.evermind.ai/api/v2/memory/purge/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/purge/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"job_id": "<string>",
"status": "queued",
"scope": "space",
"created_at": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"project_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"steps": [
{
"store": "<string>",
"state": "pending",
"deleted": 0,
"error": "<string>"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Purge
Get a memory-space purge job [Cloud-only]
Read a purge job by the job_id that /api/v2/memory/purge/confirm returned.
status goes queued → running → succeeded or failed. steps lists every store the purge touches (for example mongo:v2_episodes or es:episode) with its own state and deleted count, and error for a store that failed.
Writes to the memory space are rejected with 409 purge_in_progress until the job has ended, so poll this before writing again.
GET
/
api
/
v2
/
memory
/
purge
/
{job_id}
Get a memory-space purge job [Cloud-only]
curl --request GET \
--url https://api.evermind.ai/api/v2/memory/purge/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evermind.ai/api/v2/memory/purge/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evermind.ai/api/v2/memory/purge/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/purge/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/purge/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.evermind.ai/api/v2/memory/purge/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/purge/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"job_id": "<string>",
"status": "queued",
"scope": "space",
"created_at": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"project_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"steps": [
{
"store": "<string>",
"state": "pending",
"deleted": 0,
"error": "<string>"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
Was this page helpful?

